package com.stefan.queue;

import java.util.PriorityQueue;

public class Tester {
    public static void main(String[] args) {
        PriorityQueue<Double> p = new PriorityQueue<>();
        for (int i = 1; i <=11 ; i++) {
            p.offer(i+Math.random());
        }
        p.offer(1.08d);
        p.offer(2.8d);

        int size = p.size();
        for (int i = 0; i < size; i++) {
            System.out.println(p.poll());
        }

    }
}
